<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=640px,user-scalable=no,target-densitydpi=device-dpi" />
		<link rel="stylesheet" href="../css/css.css" type="text/css" />
		<script type="text/javascript" src='../js/jquery.min.js'></script>
		<script type="text/javascript" src='../js/main_in.js'></script>
		<script type="text/javascript" src='../js/common.js'></script>
		<script type="text/javascript" src='../js/jquery.qrcode.min.js'></script>
		<script>
			$(function(){
                
                
            });
            
            function search(){
            	$("#search_val").html('');
            	var caipiaoid = $("#caipiaoid").val();
            	
            	var issueno = $("#issueno").val();
            	var data = "?caipiaoid=" + caipiaoid + "&issueno=" + issueno + "&cardid=" + caipiaoid;
            	$.ajax({
            		url:"http://insure.unair.cn/api_s1_h.php" + data,
            		type: "GET",
            		data: {},
            		success: function(data) {
            			if(data == '{}}'){
            				
//          			alert(data)
//          			alert(data['result']['prize'])
						
							var item = "<div class='main_in_input_hide_child over_1' >无结果</div>" ;
						}else{
							data = eval("("+data+")");
							var item = "<div class='main_in_input_hide_child' >中奖号码：" + data['result']['number'] + "</div>" +
										"<div style='height:20px;'></div>";
	            			$.each(data['result']['prize'], function(k,v) {
								item += "<div class='main_in_input_hide_child over_1' >奖项：" + v.prizename + "</div>" +
										"<div class='main_in_input_hide_child over_1' >中奖条件：" + v.require + "</div>" +
										"<div class='main_in_input_hide_child over_1' >中奖人数：" + v.num + "</div>" +
										"<div class='main_in_input_hide_child over_1' >单注金额：" + v.singlebonus + "</div>"
										
	            			});
						}
							
            			
            			$("#search_val").append(item);
            			wt.close();
            		},
            		error:function(data){
            			wt.close();
            		}
            	})
            }
		</script>
	</head>
	<body>
		<div class="app_head">
			<div class="app_prev" onclick="clicked('./myinfo.html')"><img src="../img/arrow.png" /></div>
            <div class="app_head_text">彩票开奖查询</div>
            <div class="app_share" ></div>
       </div>
       <div class="app_body">
            <div class="main_in_input">
                <div class="main_in_input_text_left">彩票类型：</div>
                <select style="width: 62%;height: 60px;margin-top: 20px;font-size: 20px;" id="caipiaoid">
                	<option value="1">福利彩票</option>
                	<option value="2">体育彩票</option>
                	<option value="11">双色球</option>
                	<option value="12">福彩3D</option>
                	<option value="13">七乐彩</option>
                </select>
            </div>
            <div class="main_in_input">
                <div class="main_in_input_text_left">期号：</div>
                <div class="main_in_input_input_right"><input type="text" id="issueno" value="" /></div>
            </div>
            <div class="app_submit" onclick="search()">查&nbsp;询</div>
        </div>
        <div style="padding-bottom: 80px;" class="app_body">
            <div class="main_in_api_head" id="do_search">查询结果</div>
            <div class="search_result">
                <div style='width:90%;' class='main_in_input_hide_main' id="search_val">
                    
                </div>
            </div>
        </div>
        
	</body>
</html>
